export {}

function test(T) {
  console.log(T);
}
test('aaa')
interface Res<T> {
  msg: string
  code: number
  data: T
}

interface Data {
  goodsName: string
  price: string
}
interface DataOne {
  name: string
  gender: string
}

let goods: Res<Data> = {
  msg: '接口成功',
  code: 200,
  data: {
    goodsName: '电脑',
    price: '19.9'
  }
}
console.log(goods);

let person: Res<DataOne> = {
  msg: '接口成功',
  code: 304,
  data: {
    name: '小红',
    gender: '女'
  }
}

console.log(person);
